﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
    <script src="~/Scripts/jquery.js"></script>
    <script src="~/Scripts/messages_zh.js"></script>
    <style>
        .red{
            color:red;

        }
        .hidden{
            display:none;
        }
    </style>
</head>
<body>
    <div>
        @using (Html.BeginForm())
        {
            <p>用户名：@Html.TextBox("username","",new { @id="username"})<span>rbz傻逼</span> </p>
            <p>用户名：@Html.TextBox("password","",new { @id="password"})<span>rbz捞佬</span> </p>
            <button type="submit">提交</button>
        }
    </div>
    <script>
        function cheak() {
            var username = $("#username").val();
            var password = $("#password").val();
            if (username == "") {
                $("#userTip").removeClass("hidden");
                return false;
            } else {
                $("#userTip").addClass("hidden");

            }
            if (password == "") {
                $("#passwordTip").removeClass("hidden");
                return false;
            }
        }
    </script>
</body>
</html>
